package com.googlecode.dgwt.client.dijit.event;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.user.client.Event;

/**
 * @author wellsantos@wellsantos.com
 * @since 0.01
 */
public abstract class RowEvent<H extends EventHandler> extends GwtEvent<H> {

    private final Object rowItem;
    private final int rowIndex;
    private final Event nativeEvent;
    
    protected RowEvent(Event nativeEvent, int rowIndex, Object rowItem) {
        this.rowItem = rowItem;
        this.rowIndex = rowIndex;
        this.nativeEvent = nativeEvent;
    }

    public Object getRowItem() {
        return rowItem;
    }
    
    public int getRowIndex() {
        return rowIndex;
    }

    protected Event getNativeEvent() {
        return nativeEvent;
    }
    
}
